package com.woniuxy02;

import java.util.Scanner;

public class Test03 {
    public static void main(String[] args) {
        try {
            Scanner sc = new Scanner(System.in);
            System.out.println("输入一个整数");
            int num = sc.nextInt();
            System.out.println(num);
        } catch (Exception ex) {
            //打印异常相关的堆栈信息
//            ex.printStackTrace();
            System.out.println("出现异常，处理异常--Exception");
        } finally {
            System.out.println("有没有都会执行，收尾的清理工作");
        }

        System.out.println("程序结束");

    }

}
